<?php 
namespace Api\Controller;
class RecordController extends CommonController{
	
	protected $m;
	
	function _initialize() {
		parent::_initialize();
		$this->m = D('LessonRecord');
	}
	
	//换班记录
	function insertRecord($uid,$lsid,$original_tid,$next_tid,$original_lid,$next_lid,$remark,$type='update'){
		$data = array(
			'uid'=>$uid,
			'lsid'=>$lsid,
			'original_tid'=>$original_tid,
			'next_tid'=>$next_tid,
			'original_lid'=>$original_lid,
			'next_lid'=>$next_lid,
			'remark'=>$remark,
			'create_time' => Date('Y-m-d H:i:s'),
			'type'=>$type,
		);
		$this->m->add($data);
	}
	
	//添加学员记录
	function addRecord($uid,$lsid,$remark,$type='add'){
		$data = array(
			'uid'=>$uid,
			'lsid'=>$lsid,
			'remark'=>$remark,
			'create_time' => Date('Y-m-d H:i:s'),
			'type'=>$type,
		);
		$this->m->add($data);
	}
}